A sound effect is an effect achieved by a sound and refers to a sound added to enhance the sense of reality and atmosphere of a certain scene. The added sound may include a musical sound and an effect sound, for example, a digital sound effect, an environmental sound effect and a Moving Picture Experts Group Audio Layer-3 (MP3) sound effect (ordinary sound effect and professional sound effect).
At present, there have been many applications integrated with an audio playing function, for example, a music player like the TTPod and a video player like the Storm. Under a normal circumstance, a third-party application controlled to be installed in a mobile terminal by a user may usually have a sound effect setting function, that is, the user may preset a sound effect of a corresponding application through a control interface in the corresponding application and, in a subsequent using process, the mobile terminal may overlap the sound effect set by the user and a system sound effect (i.e., a global sound effect) of the mobile terminal and play an audio file configured with an overlapped sound effect.
Embodiments of the disclosure provide a method and a mobile terminal for sound effect processing, so as to improve audio stream playing fluency of the mobile terminal, optimize memory resource management and improve a user experience.
According to a first aspect, the embodiments of the disclosure provide a method for sound effect processing. The method may include the following actions.
Responsive to detection of a playing control instruction configured to indicate an application of a mobile terminal to play a source audio file, at least one frame of first data generated when the mobile terminal processes the source audio file through global sound effect service is acquired.
At least one frame of second data in a current playing process of the application is acquired.
When determining that the at least one frame of the first data is mismatched. with the at least one frame of the second data, the global sound effect service is disabled.
A first audio file obtained by processing the source audio file according to an application-level sound effect parameter of the application is played.
According to a second aspect, the embodiments of the disclosure provide a mobile terminal that includes functional modules. The functional modules are configured to execute part or all of the actions described in any method according to the first aspect of the embodiments of the disclosure.
According to a third aspect, the embodiments of the disclosure provide a mobile terminal that may include:
a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface may be connected and communicate to each other through the communication bus.
The memory may store an executable program code, and the communication interface may be configured for wireless communication.
The processor may be configured to call the executable program code in the memory to execute part or all of the actions described in any method according to the first aspect of the embodiments of the disclosure.